<%--
    Document   : noticiaCreate
    Created on : 10/07/2013, 19:29:04
    Author     : Max
    Description:
        Esse documento JSP é utilizado para
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <%@include file="interfaceHead.jsp" %>
    </head>

    <body>
        <div class="nonFooter">
            <%--HEADER--%>
            <%@include file="interfaceHeader.jsp" %>

            <%--MAIN--%>
            <div id="main" class="container">
                <div class="row">
                    <nav class="span3">
                        <%@include file="interfaceNavigation.jsp" %>
                    </nav>
                    <div class="span9">
                        <h1>Publicar nova notícia</h1>

                        <%@include file="interfaceMessages.jsp" %>

                        <form action="noticia" method="post"
                              class="well form-validate">

                            <div class="control-group">
                                <label for="titulo"
                                       class="control-label">
                                    Título
                                </label>
                                <div class="controls">
                                    <input type="text" name="titulo" value=""
                                           id="titulo" class="input-xxlarge"
                                           placeholder="Título da notícia"
                                           required="required"
                                           />
                                </div>
                            </div>

                            <div class="control-group">
                                <label for="chamada"
                                       class="control-label">
                                    Chamada (<em id="counter">140</em>)
                                </label>
                                <div class="controls">
                                    <textarea name="chamada"
                                              id="chamada" class="input-xxlarge no-resizable"
                                              data-provide="limit" data-counter="#counter" data-max-chars="140"
                                              maxlength="140"
                                              placeholder="Pequeno texto de introdução para a notícia (No máximo 140 caracteres)"></textarea>
                                </div>
                            </div>

                            <label for="texto">Texto</label>
                            <textarea name="texto"
                                      id="texto" class="editable-text"
                                      placeholder="Insira um texto"></textarea>

                            <%--<fieldset id="fieldset-imagem">
                                <legend>Imagens</legend>
                                <p>Insira mais de uma imagem para criar uma galeria.</p>
                                <input type="hidden" name="numero-imagens" value="1"/>

                                <div class="fileupload fileupload-new" data-provides="fileupload">
                                    <div class="fileupload-new thumbnail" style="width: 50px; height: 50px;">
                                    </div>
                                    <div class="fileupload-preview fileupload-exists thumbnail" style="width: 50px; height: 50px;"></div>
                                    <span class="btn btn-file">
                                        <span class="fileupload-new">Selecione uma imagem</span>
                                        <span class="fileupload-exists">Alterar</span>
                                        <input type="file" name="imagem1" accept="image/*"/>
                                    </span>
                                    <a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Remover</a>
                                </div>
                            </fieldset>
                            <button type="button" class="btn btn-primary"
                                    onclick="addImagem()">
                                Adicionar imagens
                            </button>
                            <hr/>

                            <fieldset id="fieldset-arquivo">
                                <legend>Arquivos</legend>
                                <input type="hidden" name="numero-arquivos" value="1"/>
                                <div class="fileupload fileupload-new" data-provides="fileupload">
                                    <div class="input-append">
                                        <div class="uneditable-input span3"><i class="icon-file fileupload-exists"></i><span class="fileupload-preview"></span></div>
                                        <span class="btn btn-file">
                                            <span class="fileupload-new">Selecione um arquivo</span>
                                            <span class="fileupload-exists">Alterar</span>
                                            <input type="file" name="file1" />
                                        </span>
                                        <a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Remover</a>
                                    </div>
                                </div>
                            </fieldset>
                            <button type="button" class="btn btn-primary"
                                    onclick="addArquivo()+">
                                Adicionar arquivos
                            </button>--%>

                            <div class="form-actions">
                                <button type="submit" name="action" value="create"
                                        class="btn btn-large btn-primary">
                                    Publicar
                                </button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
            <%--StickyFooter--%>
            <div id="push"></div>
        </div>
        <%@include file="interfaceFooter.jsp" %>
        <script src="../js/nicEdit.js" type="text/javascript"></script>
        <script type="text/javascript">
            $(document).ready(function(){
                new nicEditor(
                {
                    buttonList :
                        [
                        'bold',
                        'italic',
                        'underline',
                        'strikethrough',
                        'left',
                        'center',
                        'right',
                        'subscript',
                        'superscript',
                        'ul',
                        'ol',
                        'fontSize',
                        'removeformat'
                    ],
                    iconsPath : '../css/images/nicEditorIcons.gif'
                }).panelInstance('texto');
            });
        </script>
    </body>
</html>

